package com.citcc.business.mapper;

import com.citcc.business.bean.CdzChargeInfo;
import com.citcc.business.bean.UserOrderEntity;
import com.citcc.business.bean.UserOrderEntityExample;
import com.citcc.business.bean.dto.CdzAmountDetailCon;
import com.citcc.business.bean.vo.StatisticsStakeVo;
import com.citcc.business.bean.vo.StatisticsStationVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;
import java.util.Map;

public interface UserOrderEntityMapper {
    long countByExample(UserOrderEntityExample example);

    int deleteByExample(UserOrderEntityExample example);

    int deleteByPrimaryKey(String id);
    int deleteFlagByPrimaryKey(String id);

    int insert(UserOrderEntity record);

    int insertSelective(UserOrderEntity record);

    List<UserOrderEntity> selectByExample(UserOrderEntityExample example);
    List<UserOrderEntity> selectAllList(UserOrderEntity order);


    List<UserOrderEntity> selectByExampleWithPage(UserOrderEntityExample example, RowBounds rowBounds);

    UserOrderEntity selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") UserOrderEntity record, @Param("example") UserOrderEntityExample example);

    int updateByExample(@Param("record") UserOrderEntity record, @Param("example") UserOrderEntityExample example);

    int updateByPrimaryKeySelective(UserOrderEntity record);

    int updateByPrimaryKey(UserOrderEntity record);

    List<UserOrderEntity> queryByList(UserOrderEntity userOrderEntity);

    /**
     * 根据桩号统计数据
     * @param beginTime
     * @param endTime
     * @param stationCodes
     * @return
     */
    List<StatisticsStakeVo> getStakeList(@Param("beginTime") String beginTime, @Param("endTime") String endTime,
                                         @Param("stationCodes") String[] stationCodes,@Param("orgId")String orgId);

    /**
     * 根据站号统计数据
     * @param beginTime
     * @param endTime
     * @param stationCodes
     * @return
     */
    List<StatisticsStationVo> getStationList(@Param("beginTime") String beginTime, @Param("endTime") String endTime,
                                             @Param("stationCodes")String[] stationCodes,@Param("orgId")String orgId);
    /**
     * 根据桩号查询明细数据
     * @return
     */
    List<UserOrderEntity> getStakeDetail(UserOrderEntity userOrderEntity);

    /**
     * 充电记录
     */
    List<CdzChargeInfo> getAllChargeInfo(CdzChargeInfo cdzChargeInfo);

    /**
     * 统计充电金额
     */
    Map<String, Object> selectSumCharge();

}